package io.renren.modules.dangan.controller;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.commons.dynamic.datasource.annotation.DataSource;
import io.renren.modules.dangan.service.DaOaWsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;

/**
 * @auther guqianbin
 * @date 2019/8/26 21:44
 **/
@RestController
@RequestMapping("/daOaWs")
@CrossOrigin
public class DaOaWsController {

    @Autowired
    private DaOaWsService daOaWsService;

    /**
     * 列表
     */
    @RequestMapping(value = "/list",method = {POST,GET})
//    @RequiresPermissions("dangan:dajnmlb:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = daOaWsService.queryPage(params);
        return R.ok().put("page", page);
    }
}
